//
//  UITableViewCell+new.m
//  Qihuo
//
//  Created by Vencoo on 13-10-22.
//  Copyright (c) 2013年 Vencoo. All rights reserved.
//

#import "UITableViewCell+new.h"

@implementation UITableViewCell (new)
- (void)addTitle:(NSString *)title updatetime:(NSString *)updatetime userID:(NSString *)userID content:(NSString *)content
{
    UILabel *label = [UILabel new];
    label.text = [NSString stringWithFormat:@"title:%@  content:%@ userID:%@ updateTime:%@",title,content,userID,updatetime];
    label.font = [UIFont systemFontOfSize:25];
    CGSize size = [label.text sizeWithFont:label.font constrainedToSize:CGSizeMake(MAXFLOAT, 40)];
    label.frame = CGRectMake((self.frame.size.height - size.height)/2, 10, size.width, size.height);
    [self addSubview:label];
}
-(void)addButtonAndDate:(NSString *)date time:(NSString *)time address:(NSString *)address
{
    UIButton *btn = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    [btn addTarget:self action:@selector(editEmergency) forControlEvents:UIControlEventTouchUpInside];
    UIImage *image = [UIImage imageNamed:@"编辑按钮"];
    [btn setImage:image forState:UIControlStateNormal];
    btn.frame = CGRectMake(984 - 145, 0, image.size.width, image.size.height);
    [self addSubview:btn];
    
    UILabel *label = [UILabel new];
    label.text = [NSString stringWithFormat:@"%@   %@              %@",date,time,address];
    label.font = [UIFont systemFontOfSize:25];
    CGSize size = [label.text sizeWithFont:label.font constrainedToSize:CGSizeMake(MAXFLOAT, 40)];
    label.frame = CGRectMake((self.frame.size.height - size.height)/2,10, size.width, size.height);
    [self addSubview:label];

}

- (void)editEmergency
{
    
}
@end
